const usePagesStore = defineStore(
    'pages', {
        state: () => ({
            records: [],
            isHighLightid:undefined,
            logoUrl:"",
            safetyNum:'',
            sizeNum:14,
            isTp:false,
            onlyStyle:false,
            pageStyle:{},//守卫实时刷新
            isDownload:undefined,
            eventGlobalValue:undefined,//首页全局机器人会话值
            topbottomComPageStyle:{}
        }),
        actions: {
            setSize(records,isHighLightid) {
                this.records = records;
                this.isHighLightid=isHighLightid
            },
            triggerGlobalEvent(payload) {
                this.eventGlobalValue = payload;
            },
            setpageStyle(pageStyle){
                this.pageStyle=pageStyle
            },
            settopbottomComPageStyle(topbottomComPageStyle){
                this.topbottomComPageStyle=topbottomComPageStyle
            }
        },
        getters: {
            // 获取最新事件数据
            latestEvent: (state) => state.eventGlobalValue,
            // 获取历史事件数量
          }
    })

export default usePagesStore